package person.zhaiming.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import person.zhaiming.commons.CommonResult;
import person.zhaiming.commons.entities.Payment;
import person.zhaiming.service.ConsumerOpenFeignService;

import javax.annotation.Resource;

/**
 * @program: my-cloud-study
 * @description:
 * @author: zhaiming
 * @create: 2020-12-09 00:13
 **/
@RestController
@Slf4j
public class OrderFeignController {

    @Resource
    private ConsumerOpenFeignService service;

    @GetMapping(value = "/consumer/payment/consul")
    public String getPaymentServiceInfo(){
        return service.paymentConsul();
    }

    @GetMapping(value="/consumer/payment/getInfo/{id}")
    public String getInfo(@PathVariable("id") Long id){
        return service.getInfo(id);
    }

    @GetMapping(value="/consumer/payment/getTimeoutInfo/{id}")
    public String getTimeoutInfo(@PathVariable("id") Long id){
        return service.getTimeoutInfo(id);
    }

}
